Correcting for eccentricity of acoustic sensors in wells and pipes

ABSTRACT

A device and method used to correct beamforming of an acoustic phased array in cases of eccentricity of the acoustic device in a tubular. A processor calculates the eccentricity from multiple scan lines and create a geometric model of a well or pipe relative to the device. The processor may correct each scan line&#39;s focus and/or angle of incidence at a surface of the well or pipe based on the observed eccentricity.

FIELD OF THE INVENTION

The invention relates generally to inspection of tubulars, inparticular, acoustic sensors in oil and gas wells, water wells,geothermal wells, water mains or pipelines.

BACKGROUND OF THE INVENTION

In wells and fluid carrying pipes, such as oil wells and water deliveryinfrastructure, there often arises a need to inspect the internalstructure for integrity or obstructions. For example, hydrocarbons inproduction casing may contaminate ground water if there are cracks ordeformations in the casing. Ultrasound is a known way of imaging suchstructures to detect problems thus protecting the environment.

In some configurations, such as that taught in CA2989439 the ultrasoundsensors are disposed radially around a collar of the device, each sensorfacing generally outward towards the walls of the pipe or well. Eachsensing element may be a piezoelectric transducer arranged to projectmost of its generated sound energy radially towards the well or pipe.This energy travels through the fluid medium and backscatters off thewall (and subsequent layers).

The transducers may be in a pitch-catch or pulse echo arrangement, ineach case the image processing depends on the time for transmittedsignals to be received.

Current systems are susceptible to eccentricity, i.e. whereby thelongitudinal axes of the device and well are not concentric. This ismost pronounced when the device is operating in horizontal pipe, wheregravity tends to decentralize the device despite the use ofcentralizers.

This is particularly problematic with phased arrays, where severaltransducer elements cooperate to transmit and receive ultrasonic pulses.Timing delays are carefully calculated to create a wavefront having aset direction and focus at a particular depth on the pipe. These timingdelays assume the pipe is circular in cross section and co-axial withthe device (i.e. with the circular array of transducers.)

The present invention aims to address one or more of the aboveshortcomings by operating transducers in a novel way.

SUMMARY OF THE INVENTION

In accordance with a first aspect of the invention, there is provided amethod of operating a device having an array of acoustic transducerelements distributed radially around the device. The method comprises:deploying the device into a well or pipe; capturing acoustic imagecomprising plural scan lines, each scan line generated by a plurality ofthe transducer elements; determining an eccentricity of the device inthe well or pipe from time-of-flight of at least some of the scan lines;calculating phase delays to the transducer elements used to generateeach scan line to correct for the eccentricity.

The phase delays may be calculated to direct the scan lines to arrivesubstantially perpendicular to a surface of the well or pipe, in atransverse plane of the well or pipe.

The phase delays may be calculated to correct the focus of the scanlines with respect to the well or pipe.

The acoustic images are based on time-of-flight of at least some of thescan lines. Determining eccentricity may comprise creating a geometricmodel of the well or pipe relative to the device, preferably fitting acircle, ellipse or spline model from the acoustic images ortime-of-flight of at least some of the scan lines.

The method may write the calculated phase delays into a first memorywhile reading phase delays from a second memory for capturing theacoustic image frames, then further comprising switching pointers to thefirst and second memories at a subsequent frame for the steps of writingand reading of the phase delays.

The method may, for each scan line, select elements that are proximate alocation that that scan line intercepts the array.

The method may repeat the steps of capturing frames, determiningeccentricity and calculating phase delays, in real-time, while movingthe device through the well or pipe.

Determining eccentricity may be performed over a plurality of frames,preferably performed over a moving average, median fit or spline fit ofa plurality of recent frames.

The eccentricity may be calculated to model localized portions of thewell or pipe that are deformed and wherein phase delays are calculatedto correct beamforming for those localized portions based on the model.

The phase delays may synthesize the scan lines as appearing to originatefrom a centre of the model of the well or pipe.

The method may adjust start of a receiving window for each scan linebased on an eccentric distance from the plurality of the transducerelements in that scan line to the well or pipe.

In accordance with a second aspect of the invention, there is provided adevice comprising: an elongate body deployable into a well or pipe; anarray of acoustic transducer elements connected to and distributedradially with respect to the elongate body; a memory storing phasedelays for beamforming scan lines from a plurality of transducerelements; a circuit to transmit and capture the scan lines using thephase delays and a processor. The processor is arranged to: calculateeccentricity of the device in the well or pipe from time-of-flight ofthe plural scan lines; calculate new phase delays for the transducerelements used to generate each scan line to correct for theeccentricity; and load the new phase delays into the memory.

The device may comprise a multiplexer for selecting a set of transducerelements from the array to create a scan line and wherein the processoris arranged to select the set elements for each scan line to correct forthe eccentricity.

The memory may be logically or physically divisible into a first memoryportion accessed by the circuit for beamforming and a second memoryportion accessed by the processor for writing the new phase delays.

The circuit or processor may be arranged to switch pointers to the firstand second memory portions for writing and reading of the phase delays.

The correction to the beamforming enables the device to operate withsome off-center positioning. The resulting pulses are much crisper thanprevious systems.

BRIEF DESCRIPTION OF THE DRAWINGS

Various objects, features and advantages of the invention will beapparent from the following description of embodiments of the invention,as illustrated in the accompanying drawings. The drawings are notnecessarily to scale, emphasis instead being placed upon illustratingthe principles of various embodiments of the invention.

FIG. 1 is a cross-sectional view of an imaging device deployed in awellbore in accordance with one embodiment of the invention.

FIG. 2A is a perspective-view of a radially acoustic array and a fieldof view.

FIG. 2B is a perspective-view of a radial acoustic array in a conicalarrangement.

FIG. 3 is a cross-sectional view of an imaging device in a well.

FIG. 4 is a plan view of a device in a well.

FIG. 5 is an illustration of shapes fitted to reflected points.

FIG. 6 is timing diagram for scheduling transducers.

FIG. 7 is an illustration of scan lines and their transmission center.

FIG. 8 is an illustration of scan lines from a conical array.

FIG. 9 is a circuit block diagram for ultrasound transducers.

FIG. 10 is an illustration of a cylindrical coordinate system.

FIG. 11 is an illustration of different centers and aperture selections.

FIG. 12 is a workflow for correcting for eccentricity.

Similar reference numerals indicate similar components having thefollowing key:

-   2 tubulars, such as a well, pipe, borehole, tubing, or casing;-   10 imaging device;-   11 scan line;-   12 acoustic array;-   13 transducer element;-   14 imaging/control circuit-   15 acoustic aperture;-   16 body;-   17 wireline;-   18 operations site;-   20 centralizers;-   21 tool center;-   22 transmission center;-   24 ellipse fit;-   25 spline fit;-   26 focal distance;-   27 inner radius to capture;-   28 outer radius to capture;-   29 internal void;-   30 inner pipe surface;-   31 outer pipe surface;-   80 Analogue Front End;-   81 HV Pulser;-   82 HV Mux/Demux;-   83 HV Protection switch;-   84 FPGA;-   85 ADC;-   86 Amplifiers (including DVGA, LNA, and Summing Amps);-   87 Image processor;-   88 Rx beamforming; and-   89 Tx beamforming.

DETAILED DESCRIPTION OF THE INVENTION

With reference to the figures, devices and methods are disclosed forcorrecting beamforming during imaging a fluid-carrying conduit by anacoustic transducer array. This conduit may be a well/pipe for carryinghydrocarbons or water and will generally have an elongate form factorthrough which the device can move longitudinally. The device typicallyalso has an elongate form factor and is sized to be deployable withinthe well or pipe. Wells include cased and uncased wells, at any stagefrom during drilling to completion to production to abandonment.

In accordance with one embodiment of the invention, there is provided animaging device 10 for imaging a wellbore 2, as illustrated in FIGS. 1and 3 . The imaging device 10 generally comprises an acoustic transducerarray 12, a body 16, an imaging circuit 14, optional actuators 19, andone or more centralizing elements 20. Acoustic transducers are desirablein fluid well inspection applications because they can work even inopaque fluids, can be beam steered to change the apparent direction of awave-front, and can be beam focused to inspect different depths. Thus,the imaging device can acquire volumetric data of the well. Thevolumetric data can include surface features of cases/liners/tubulars,defects in cases/liners/tubulars, and structure of rock formationsbeyond the tubular.

The device may be that described in patent applications WO2016/201583A1published 22 Dec. 2016 to Darkvision Technologies Ltd, incorporatedherein in its entirety. Described therein is a device having an array ofradially-distributed, outward-facing acoustic transducers (i.e. a radialarray). The array 12 sonifies the well or pipe with acoustic pulsesemitted radially 11 a or conically 11 b (see FIG. 3 ).

Transducers

The array comprises a plurality of acoustic transducer elements,preferably operating in the ultrasound band, preferably arranged as anevenly spaced one-dimensional radial array (see FIGS. 2A, 2B). Thefrequency of the ultrasound waves generated by the transducer(s) isgenerally in the range of 200 kHz to 30 MHz, and may be dependent uponseveral factors, including the fluid types and velocities in the well orpipe and the speed at which the imaging device is moving. In most uses,the wave frequency is 1 to 10 MHz, which provides reflection from micronfeatures.

The number of individual elements in the transducer array affects theresolution of the generated images. Typically, each transducer array ismade up of 32 to 2048 elements and preferably 128 to 1024 elements. Theuse of a relatively large number of elements generates a fine resolutionimage of the well. The transducers may be piezoelectric, such as theceramic material, PZT (lead zirconate titanate). Such transducers andtheir operation are well known and commonly available. Circuits 14 todrive and capture these arrays are also commonly available.

The transducers may be distributed radially, equidistant around the bodyof the device. As seen in FIG. 2A, the transducers 13 may besubstantially outward, radially-facing. When the device is situatedlongitudinally in the well/pipe, this arrangement is useful formeasuring wall thickness. In this ‘caliper arrangement’, a firstreflection is received from the inner wall 30 and then a secondreflection is received from the outer wall 31. However, there may bemultiple reflections as the wave bounces between walls. This transducerarrangement captures a ring-shaped cross-sectional slice of the wellcovering 360° around the array 12 and is useful for thicknessmeasurements. As the device is moved axially in the well or pipe, ineither direction, the ring-shaped transducer continually captures slicesof the well that are perpendicular to the longitudinal axis of the welland logs a 3D image of the well.

In the alternative arrangement of FIG. 2B, the transducers aredistributed on a frustoconical surface with transducers facing partiallyin the longitudinal direction of the device, (and thus in thelongitudinal direction when in the well). Thus, the radial transducersare angled uphole or downhole to form an oblique-shaped conical field ofview. The cone may have a cone angle β of 10-45°, preferably about 20°.In this arrangement, much of the sound wave reflects further downward,but a small portion backscatters off imperfection on the surfaces orvoids within the wall back towards the transducer. FIG. 2B showsacoustic pulses (moving in the direction of the dashed lines)transmitted towards inner wall 30, most of which bounces downward andsome backwards to the transducer 13. Some of the wave energy (dot-dashedlines) propagates to the outer wall 31, then bounces downward andpartially back to the transducer. FIG. 8 illustrates all scan lines in aframe projecting radiating outwards and partially axially (Z axis), as acone (called the imaging cone),

This conical design may also face uphole, i.e. towards the proximal endof the device and the operator. The array 12 may be located at an end ofthe device (e.g. FIGS. 2A, 2B) or between the ends (e.g. FIG. 3 ).

Scan Frame

An acoustic transducer element can both transmit and receive soundwaves. A plurality of transducer elements cooperates as a phased-arrayto generate a steered and focused wavefront. The apparent origin of thewave can be synthesized within the device, referred to as a‘transmission point,’ (or ‘transmission center’ 22 for a plurality ofintersecting scan lines), by the set of transducers, called the aperture15. The number of scan lines N that make up a full frame may be the sameas the number of elements M in the array, but they are not necessarilythe same. In FIG. 2A, (solid) scan line 11 appears to radiate out(dashed line) from the center of the four transducers 13 in aperture 15(enveloped by the dotted line).

Discreet omnidirectional pulses are emitted from the plural transducers,which waves interfere constructively and destructively to produce awavefront moving in the direction of the scan line. As known in the art,altering the timing of the pulse at each transducer, can steer and focusthe wavefront. In steering, the combined wavefront appears to move awayin a direction that is not-orthogonal from the transducer face, butstill in the plane of the array. In focusing, the waves all converge ata chosen distance from the elements. The location of the convergence isthe focal point and the area sonified defines the resolution of thesystem. FIG. 7 illustrates an example device, whereby 384 scan linesfocus at a diameter 26 (e.g. 12 cm), to create non-overlapping sonifiedareas of 1 mm resolution.

The timing of each scan comprises a transmission window Tx, receivingwindow Rx and dwell period therebetween. As used herein, a scan line 11is the stream of data received during Rx and may be provided in physicalcoordinates using the speed of sound. FIG. 6 is a timing diagram showingTx and Rx periods for scans 5, 155, 312 and 64. During transmission, thetransducers are excited with an electrical pulser 81, which pulse may besquare, sinusoidal or other regular waveform. At the end of Tx there isa dwell period while the wave travel outs and back to the transducerelement or aperture. During the Rx window, the circuit ‘listens’ toreflections at the transducer element or aperture. There may be multiplereflections along paths of various lengths, so the Rx window is muchwider than the Tx window.

By way of example, the transmission step may include selecting theelements in the aperture, calculating beamforming timings, loading thepulse timings from the FPGA 84, activating the pulser 81 and MUXes 82 topulse all elements. The dwell period may be set by the operator based onthe expected diameter of the pipe and speed of sound in the well fluid.The Rx window may be set to capture the first reflected pulse from theinner radius of interest (27) until the last element has received thelast pulse that could reflect off the outer radius of interest 28 (SeeFIGS. 2A and 7 ). The scan line's capture radii 27/28 will normally bewider than the actual wall thickness 30/31.

The dwell and Rx window may be automatically adjusted by the processorto account for the true well diameter, eccentricity, local speed ofsound, and last reflected, usable pulse. The scheduler cycles throughall N lines in a frame.

Improved Scheduling

As taught in GB1816867.4 filed 16 Oct. 2018, incorporated herein in itsentirety, scheduling may be overlapped to increase the frame rate. Animprovement is to schedule the Tx for each line to complete before theRx window of the previous line starts. This reduces each sensor periodby Rx+Tx, reducing the total frame period by 22 ms in the example above.

Indeed, in preferred embodiments of the present invention, the frameperiod can be vastly reduced by transmitting multiple pulses (Tx1, Tx2,Tx3, etc.) before the first Rx window, i.e. within the first dwellperiod. As shown in FIG. 6 , three transmissions are sent before thefirst receive window is started for listening. This pattern is repeated,with two transmissions sent in the dwell period of each previous linescan. Note that there are still no Tx or Rx windows overlapping. In FIG.6 , there is enough time in the first dwell period to scheduleadditional Tx but then some windows will overlap and/or the pattern willbecome unsustainable.

As taught in GB1816867.4, the scheduler selects one scan line from eachstratum in a structured approach, random approach, or with correlatedsampling.

Circuit

The device comprises a processing circuit for generating and receivingsignals from the transducers. The skilled person will appreciate thatthe circuit may implement logic in various combinations of software,firmware, and hardware that store instructions process data and carryout the instructions. Specialized Ultrasound circuits exist to drive andreceive arrays of ultrasound transducers, such as LM96511 from TexasInstruments. FIG. 9 reproduced from the corresponding Data Manual(www.ti.com/lit/ds/snas476h/snas476h.pdf accessed 1 Aug. 2018) providesan example circuit comprising a computer processor (for display and postprocessing), FPGA block 84, Summing Amps 86, ADC 85, MUX/DEMUX 82, HighVoltage T/R switch 83, High Voltage Pulser 81, and timing chips. TheFPGA is an efficient chip for integrating many logical operations. Theblock may comprise Tx beamforming 89 and Rx beamforming 88, DVGA control(Digitally controlled Variable Gain Amplifiers), as well as dataprocessing operations 87, such as B-mode (brightness mode) and Dopplerprocessing. Although not shown, the circuit may additionally comprisemotor drivers and memory chips.

Without loss of generality, each of these components may comprisemultiples of such chips, e.g. the memory may be multiple memory chips.For the sake of computing efficiency, several of the functions andoperations described separately above may actually by combined andintegrated within a chip. Conversely certain functions described abovemay be provided by multiple chips, operating in parallel. For example,the LM96511 chip operates eight transducers, so four LM96511 chips areused to operate an aperture of 32 transducers.

The computer processor accesses instructions stored in the memory. Theinstructions may control the operation of the device, its actuators, andhigh-level scanning steps, while the actual timing of transducers may beleft to FPGA 84. The FPGA memory may store a plurality of beamformingparameters, such as the sequence of lines, transducer addressescomprised in a given line, and the phase delays of the transducers inthe aperture. In preferred embodiments, there are two such memories thatalternate in purpose, one memory storing the presently used values and asecond memory being written with newly calculated values. This allowsthe device to correct eccentricity in real-time and log continuously,without pausing to load new values which otherwise would corrupt a scanmidway through. The processor may comprise circuitry or instructions tochange the memory pointer for reading and writing of beamformingparameters, from which the next scan line is to be created, preferablytimed for the beginning of a new frame.

The FPGA generates a set of timing signals as well as selection signalsto control the MUX. The pulser receives the timing signals and generateone or more pulses of electrical energy to vibrate the piezoelectricalcrystals at the drive frequency. The MUX selects the desired set oftransducers in the scan line to receive the timed pulses. The HV switch83 prevents the high voltage pulses from reaching the analog front end80.

During the Receive window, the switch 83 connects the analog chip 80 tothe same transducers selected by the MUX. The signals may be sampled ata higher frequency than the pulse frequency, preferably at least twicethe pulse frequency. The same delay timings are applied to the receivedsignals to offset the signals and sum them using the Summing Amp 86. ADC85 converts the summed signal to the digital domain, which data isprocessed in B-mode or Doppler mode.

Centralizing

The imaging device 10 may include one or more centralizing elements forkeeping the imaging device in the center of the wellbore. FIG. 3illustrates a device comprising a centralizing element 20, wherein thecentralizing arms extend outwardly and abut the inner wall of the wellcasing or pipe 2 to keep the device in the center of the well or pipe.They may be two centralizers, one before and one after the array to becentered.

The device is ideally concentric with the conduit, i.e. the longitudinalaxis of the imaging device is perfectly aligned with the longitudinalaxis of the well or pipe. Therefore scan lines radiate perpendicular outfrom the array, arrive perfectly focused and perpendicular to thetubular's surface, and reflect back to the same transducers. The timesof flight for every transmission to the well or pipe are substantiallythe same for a circular tubular, with small variations due to surfaceimperfections. Ideally, the receiving window Rx may be tightly framedaround the inner and outer surfaces of the pipe, i.e. the time forrecording reflections is timed to start just before the expected innerreflections and stop just after the outer reflections.

However in reality, the device tends to be off-center of the well (i.e.the longitudinal axes are parallel but not aligned), a condition calledeccentricity. This may be because the centralizers 20 are not workingcorrectly, or the weight of the device pulls the device below thelongitudinal axis of the pipe in horizontal orientations, such as thelower part of well 2 shown in FIG. 1 . Also, the pipe itself may benon-circular (e.g. deformed) due to stresses applied to it.

For example, the Rx window to detect reflections in a 1 cm thick steelcasing would minimally be 0.01 m/5790 m/s=1.7 μs. If the device were 2cm off-axis, the Rx window in the uncompensated case would be widenedfor both the closest and furthest points, making the window an addition4 cm/1590=25 μs. This is a large relative change and will compriselargely empty data.

Eccentricity Correction

In the present system, the eccentricity, specifically thecross-sectional eccentricity, is determined, and beamforming adjustmentsare calculated to regain the above advantages, such as perpendicularincidence, better focus and tighter Rx windows. The calculations aremade with respect to the geometric model of the pipe, as the actual pipegeometry is not known a priori.

The circuit stores delay timings for each element in the aperture, whichtimings may be initialized based on an expected pipe diameter andassumption of perfect centralization (no eccentricity). Multiple scanlines are transmitted, and the times of flight are recorded, whichcorresponds to the pulse-echo time. In FIG. 4 there are different timesof flight for two elements 13, which are convertible to distances by thespeed of sound in the fluid to determine lateral eccentricity. Withadditional scan lines at different positions, two-dimensionaleccentricity can be determined.

FIG. 5 illustrates a set of distances (spots) measured from the devicebased on the times of flight. Due to signal noise and artefacts in thewell, one cannot assume these represent the actual shape and location ofthe pipe—indeed there may appear to be sharp discontinuities thatphysically should not exist.

Thus the processor preferably fits a shape or spline to the pipe. InFIG. 5 , solid line 24 represent a best fitting ellipse based on leastsquares errors. Dashed line 25 is a spline fit. Other shapes and fittingalgorithms are known and envisaged. For example the Random SampleConsensus (RANSAC) algorithm is a known iterative method to estimateparameters of a shape model, such as a circle, from a set of observeddata that contains noise and outliers.

In some embodiments, the processor determines the current eccentricityfrom the acoustic images, preferably by averaging over several frames.Eccentricity calculations may be performed periodically (e.g. every Xframes), or performed on a moving average, median fit or spline fit ofthe last Y frames. Depending on the eccentricity shape fitting used, theresulting representation will have one (circle), two (ellipse) ormultiple (spline) central points, recorded as transverse offsets fromthe center 21 of the radial sensor array or of the device. The offsetsmay be in cartesian coordinates (x, y) or polar coordinates (Z, R, θ asshown in FIG. 10 ). These focal points indicate where plural scan linesreflected perpendicular from the pipe surface would meet.

These central point(s) may then be treated as the transmission point(s)22 from which scan lines would appear to originate after the beamformingadjustment. The transmission center 22 should be within the envelope ofthe radial transducer array to ensure all scan lines can be generatedoptimally. Otherwise certain scan lines will not arrive perpendicular tothe pipe surface. FIG. 11 illustrates scan lines 11 generated bytransmission aperture 15 a and received by receiving aperture 15 b,which lines converge at point 22, which is within the array but offsetfrom the device center 21.

In known systems, different but static timings are provided to theelements, whereby outer elements are pulsed before inner elements andthe outer elements are pulsed symmetrically, i.e. elements equaldistance from the center of the scan line are pulsed at the same time.Thus the coherent wavefront will be move perpendicularly away from thearray surface. By pulsing the outer elements even earlier, the wavefrontnarrows to a focal distance 26 on the pipe.

In the present system, for eccentric conditions, the timings are notsymmetric about the center of the aperture. The scan line does not leaveperpendicular from the array. Instead the processor calculates timingdelays for the aperture of each scan line, such that the scan linesarrive substantially perpendicular to the modelled surface of the pipe.That is the wavefront arrives parallel to the surface and reflects backtowards the array.

Focus

In prior systems, the beamed may be focused to converge at the innersurface of the pipe. The device may easily be off-center by an amountequal to the pipe wall thickness, such that the beam actually focussesat the outer surface of the near wall or in the fluid before the innersurface of the far wall.

In the present system, the focus of each wave, determined by phasedelays within the aperture, is calculated in real-time to correct forthe change in distance due to eccentricity. The processor calculates thedistance to the modelled pipe from the centre of each aperture. Thuseven those scan lines emitted perpendicular to the array will beaffected by eccentricity, in order to correct the focal distance and setthe start of the Rx window.

The phase-delays used to create the transmission pulse may be re-usedduring receiving to shift and sum signals by summing amplifier 86. Thisre-use simplifies processing especially for real-time, on-chip signalprocessing.

However, this approach assumes that the modelled pipe is the same as thereal pipe that causes the reflections. In preferred embodiments, theshifting is done to optimize coherent summation, selecting shiftingvalues where the combined signal is maximum. The processor may use theTx delays as a starting point, and hunt about those delays to find theoptimal Rx delays.

The receiving and transmit apertures may be a different size dependingon the circumstance. For example, for attenuating fluids it isadvantageous to use a larger number of transmit elements to ensuremaximum energy transfer while reducing the number of receive elements tominimize the strength of the side lobes.

The focal point calculations can also be used to correct the Rx windowto start at the modelled distance (and thus time) to the sonified spotfrom the array. This is a change to the dwell time and thus also to thescheduling of lines. The Tx windows will increase for extreme beamsteering cases, but this is small compared to the other timings. Forexample, a regular interlacing scheduling pattern will be interrupted incases where the longer (or shorter) dwell time and displaced Rx windowwould now cause any Rx and Tx widows to overlap.

Aperture

As discussed above, the aperture 15 is a set of neighboring transducerelements that individually contribute towards the constructive wavefrontand increase its acoustic energy. There may, for example, be 32 or 64elements in the aperture that are selected from the whole array bymultiplexors. Normally these are a symmetrical set of elements oppositethe pipe spot to be sonified, i.e. the spot and aperture centre have thesame azimuthal angle θ.

However, as the tool becomes eccentric some of the elements do not haveline-of-sight to the sonified spot, being blocked by the device body. InFIG. 4 , scan line 11 is normal to the wall but the aperture 15 is notsymmetric about this normal line. Here, the selection of elements isrotated two elements from those that would be selected when the deviceis centered. Conversely the aperture in the horizontal scan lines inFIG. 4 are unaltered.

One selection scheme is to project the scan line perpendicular from thewell or pipe thru the radial array to determine an intercept location.Then a set of elements proximate the intercept location are selected forthe aperture. For example, the aperture may be the closest 16 elementson either side of this location.

Deployment System

The imaging device includes a connection to a deployment system forrunning the imaging device 10 into the well 2 and removing the devicefrom the well. Generally, the deployment system is wireline 17 or coiledtubing that may be specifically adapted for these operations. Otherdeployment systems can also be used, including downhole tractors andservice rigs.

Although the present invention has been described and illustrated withrespect to preferred embodiments and preferred uses thereof, it is notto be so limited since modifications and changes can be made thereinwhich are within the full, intended scope of the invention as understoodby those skilled in the art.

Computer Program Listings

Processing for determining and correcting for eccentricity may beperformed in software or firmware. A software implementation in C++ isprovided below to aid in understanding the logic and correctionalgorithms described above. The skilled person will appreciate that thecode provided is part of a larger program that would be written orimported to run properly.

void ImagingController::eccentricBeamforming( ) {calculateScanLineCoordinates( ); // Plan the scan linesfindActiveElements( ); // Find the active elements in the aperturecalculateTxDelays( ); // Calculate the Tx delays calculateRxDelays( );// Calculate the Rx delays } voidImagingController::calculateScanLineCoordinates( ) { const doubleVector3TranmissionCentre(m_params.m_TransmissionCentre[0],m_params.m_TransmissionCentre[1], m_params.m_TransmissionCentre[2]);auto& lines = m_lineSequence; uint32_t numLines =uint32_t(m_params.m_imageHeight); lines.resize(numLines); constdoubleVector3 unitX{ 1,0,0 }; const doubleVector3 referenceLineStart =unitX * m_params.m_minRadius; const doubleVector3 referenceLineStop =unitX * m_params.m_maxRadius; const doubleVector3 referenceLineFocus =unitX * m_params.m_focus; double referenceLineLengthProjected =distance(referenceLineStop, referenceLineStart) /cos(m_probe.m_coneAngle * M_PI /180.0); doublereferenceLineFocusProjected = (referenceLineFocus.x −referenceLineStart.x) / cos(m_probe.m_coneAngle * M_PI /180.0); double a= ::tan((90 − m_probe.m_coneAngle) * M_PI /180.0); for (uint32_t lineNo= 0; lineNo < numLines; lineNo++) { auto& line = lines[lineNo]; doubleangle = static_cast<double>(lineNo) / static_cast<double>(numLines) *m_probe.m_fieldOfView * M_PI /180.0; const auto rotation =doubleMatrix3x3(rotate(angle, doubleVector3{ 0, 0,1 })); doubleVector3start = (rotation * referenceLineStart) + TransmissionCentre;doubleVector3 stop = (rotation * referenceLineStop) +TransmissionCentre; doubleVector3 focus = (rotation *referenceLineFocus) + TransmissionCentre; // Project lines onto imagingcone (if conical probe) if (m_probe.m_coneAngle > 0) { start.z =sqrt((pow(start.x, 2) + pow(start.y, 2)) / pow(a, 2)); stop.z =sqrt((pow(stop.x, 2) + pow(stop.y, 2)) / pow(a, 2)); focus = start +normalize(stop − start) * referenceLineFocusProjected; stop = start +normalize(stop − start) * referenceLineLengthProjected; } const doublelineLength = distance(stop, start); line.m_start = start; line.m_stop =stop; line.m_txFocus = focus; } } voidImagingController::findActiveElements( ) { const auto& elementNormals =m_probe.m_elementNormals; const auto& elementPositions =m_probe.m_elementPositions; const uint32_t numElements =checked_cast<uint32_t>(elementPositions.size( )); staticstd::vector<uint32_t> s_possibleElements; static std::vector<uint32_t>s_elementIndices; // Direction of line const doubleVector3 lineDir =normalize(lineStop − lineStart); const double lineLength =distance(lineStop, lineStart); // Find all the normal projections for(uint32_t i = 0; i < numElements; i++) { const doubleVector3& n =elementNormals[i]; const double dotProduct = dot(n, lineDir);PossibleElement element; const doubleVector3& p = elementPositions[i];const doubleVector3 p0 = p − lineStart; const doubleVector3 p1 = p −lineStop; const doubleVector3 crossProd = cross(p0, p1);element.distance = length(crossProd) / lineLength; element.normalMag =dotProduct; element.elementNo = i;s_possibleElements.push_back(element); } // Sort based on distance online, ascending order std::sort(s_possibleElements.begin( ),s_possibleElements.end( )); uint32_t maxIndices = apertureSize; for(uint32_t i = 0; i < s_possibleElements.size( ) && i <size_t(maxIndices); i++) {s_elementIndices.push_back(s_possibleElements[i].elementNo); } } voidImagingController::calculateTxDelays( ) { for (auto& line :m_lineSequence) { // Generate the Tx beamforming delay profile foraperture for (uint32_t elementIndex = 0; elementIndex < activeElements;elementIndex++) { const doubleVector3& element =line.m_txActiveElementPositions[elementIndex];line.m_txDelays[elementIndex] = calcBeamformingDelay(element,line.m_txReferencePoint, line.m_txFocus); } } } voidImagingController::calculateRxDelays( ) { for (auto& line :m_lineSequence) { // Generate the Rx beamforming delay profile for eachelement in aperture double lineLength = length(line.m_stop −line.m_start); for (uint32_t elementIndex = 0; elementIndex <activeElements; elementIndex++) { const doubleVector3& element =line.m_rxActiveElementPositions[elementIndex]; uint32_t focalIndex = 0;for (doubleVector3 focalDistance = 0; focalDistance < lineLength; focalDistance += focalStep) { doubleVector3 focalPoint = focalDistance *normalize(line.m_stop − line.m_start) + line.m_start;line.m_rxDelays[elementIndex][focalIndex] =calcBeamformingDelay(element, line.m_rxReferencePoint, focalPoint);focalIndex++; } } } } doubleVector3ImagingController::calcBeamformingDelay(const doubleVector3& element,const doubleVector3& referencePoint, const doubleVector3& focalPoint) {const doubleVector3 FmR = focalPoint - referencePoint; return(length(FmR) − distance(focalPoint, element)) * normalize(FmR) /SPEED_OF_SOUND; }

The invention claimed is:
 1. A method of operating an imaging devicehaving an array of acoustic transducer elements distributed radiallyaround the imaging device, the method comprising: deploying and movingthe imaging device through a well or pipe; capturing a plurality scanlines, each scan line generated by a plurality of the transducerelements; determining an eccentricity of the device in the well or pipefrom time-of-flight of at least some of the scan lines; and using thedetermined eccentricity, calculating phase delays for the transducerelements; and capturing at least one additional scan line by controllingthe transducer elements based at least in part on the calculated phasedelays to correct for the eccentricity.
 2. The method of claim 1,wherein the phase delays are calculated to direct a wavefront used tocapture the at least one additional scan line to arrive substantiallyperpendicular to a surface of the well or pipe, in a transverse plane ofthe well or pipe.
 3. The method of claim 1, wherein the phase delays arecalculated to correct the focus of the at least one additional scan linewith respect to the well or pipe.
 4. The method of claim 1, whereindetermining eccentricity comprises creating a geometric model of thewell or pipe relative to the device.
 5. The method of claim 1, whereindetermining eccentricity comprises fitting a circle, ellipse or splinemodel from the acoustic images.
 6. The method of claim 1, furthercomprising writing the calculated phase delays into a first memory whilereading other phase delays from a second memory for capturing theplurality of scan lines.
 7. The method of claim 6, further comprisingswitching pointers to the first and second memories at a subsequentframe for the steps of writing the calculated phase delays and readingof the other phase delays.
 8. The method of claim 1, further comprising,for each scan line, selecting a subset of the acoustic imaging elementsthat are proximate a location on the array intercepted by that scanline.
 9. The method of claim 1, further comprising repeating the stepsof capturing, determining eccentricity and calculating phase delays, inreal-time, while moving the device through the well or pipe.
 10. Themethod of claim 1, wherein determining eccentricity is performed over aplurality of frames, or performed over a moving average, median fit orspline fit of a plurality of recent frames.
 11. The method of claim 1,wherein eccentricity is calculated to model localized portions of thewell or pipe that are deformed and wherein the capturing at least oneadditional scan line includes beamforming for the localized portionsbased on the model.
 12. The method of claim 5, wherein the capturing atleast one additional scan line includes synthesizing the at least onescan line as appearing to originate from a centre of the model of thewell or pipe.
 13. The method of claim 1, further comprising adjustingstart of a receiving window for each of the plurality of scan linesbased on an eccentric distance from the plurality of the transducerelements in that scan line to the well or pipe.
 14. A device comprising:an elongate body deployable into a well or pipe; an array of acoustictransducer elements connected to and distributed radially with respectto the elongate body; a memory storing phase delays for beamforming scanlines from a plurality of transducer elements; a circuit to transmit andcapture the scan lines using the phase delays; and a processor arrangedto: calculate eccentricity of the device in the well or pipe fromtime-of-flight of at least some of the scan lines; using the calculatedeccentricity of the device, calculate new phase delays for thetransducer elements; and load the new phase delays into the memory;wherein the circuit is configured to control the transducer elementsbased at least in part on the new phase delays to capture at least oneadditional scan line to correct for the eccentricity.
 15. The device ofclaim 14, further comprising a multiplexer for selecting a set oftransducer elements from the array to create the at least one additionalscan line and wherein the processor is arranged to select the setelements for each scan line to correct for the eccentricity.
 16. Thedevice of claim 14, wherein the memory is logically or physicallydivisible into a first memory portion accessed by the circuit forbeamforming and a second memory portion accessed by the processor forwriting the new phase delays, wherein the circuit or processor isarranged to switch pointers to the first and second memory portions forwriting and reading of the phase delays.
 17. The device of claim 14,wherein the new phase delays are calculated to direct a wavefront usedto capture the at least one additional scan line to arrive substantiallyperpendicular to a surface of the well or pipe, in a transverse plane ofthe well or pipe.
 18. The device of claim 14, wherein the new phasedelays are calculated to correct the focus of the at least oneadditional scan line with respect to the well or pipe.
 19. The device ofclaim 14, wherein calculating eccentricity comprises creating ageometric model of the well or pipe relative to the device, thegeometric model comprising a circle, ellipse or spline model from theacoustic images.
 20. The device of claim 14, wherein the processor isfurther arranged to select, for each scan line, transducer elements thatare proximate a location on the array intercepted by that scan line. 21.The device of claim 14, wherein the processor is further arranged torepeat the steps of calculating eccentricity and calculating new phasedelays, in real-time, while the device moves through the well or pipe.22. The device of claim 14, wherein calculating eccentricity isperformed over a plurality of frames, or performed over a movingaverage, median fit or spline fit of a plurality of recent frames. 23.The device of claim 14, the processor is further arranged to adjuststart of a receiving window, for each at least one additional scan line,based on an eccentric distance from the plurality of the transducerelements in the respective at least one additional scan line to the wellor pipe.